package com.itheima.service.impl;

import com.itheima.dao.BookDao;
import com.itheima.dao.UserDao;
import com.itheima.service.UserService;

public class UserServiceImpl implements UserService {
    public UserServiceImpl(){

    }


//    注入数字
    private int num;
//    注入字母
    private String version;
    private BookDao bookDao;
    private UserDao userDao;

    public void setVersion(String version) {
        this.version = version;
    }

    public void setNum(int num) {
        this.num = num;
    }



    public void setBookDao(BookDao bookDao) {
        this.bookDao = bookDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void save() {
        System.out.println("user service is running..." + num + version);
        userDao.save();
        bookDao.save();
    }
}
